//
//  SRSportShareView.m
//  SportRing
//
//  Created by icelee on 14-10-29.
//  Copyright (c) 2014年 HotOne. All rights reserved.
//

#import "SRSportShareView.h"

@interface SRSportShareView()

@property (nonatomic , weak)IBOutlet SRSportShareHeaderView *srSportShareHeaderView;
@property (nonatomic , weak)IBOutlet SRSportShareContentForDayView *srSportShareContentForDayView;
@property (nonatomic , weak)IBOutlet SRSleepingShareContentView *srSleepingShareContentView;
@property (nonatomic , weak)IBOutlet SRSportShareContentForMonthView *srSportShareContentForMonthView;
@property (nonatomic , weak)IBOutlet SRSportShareBottomBackgroundView *srSportShareBottomBackgroundView;


@end

@implementation SRSportShareView

- (void)awakeFromNib{
    [super awakeFromNib];
}

- (void)setHeaderDataWithHeaderModel:(SRSportShareHeaderViewModel *)model
{
    [_srSportShareHeaderView setSRSportShareHeaderViewDataWithModel:model];
}

- (void)setSRSportShareContentForMonthViewData:(SRSportShareContentForMonthViewModel *)model
{
    [_srSportShareContentForMonthView setSRSportShareContentForMonthViewData:model];
}

- (void)setSRSleepingShareContentViewData:(SRSleepingShareContentViewModel *)model
{
    [_srSleepingShareContentView setSRSleepingShareContentViewData:model];
}

- (void)setSRSportShareContentForDayViewData:(SRSportShareContentForDayViewModel *)model
{
    [_srSportShareContentForDayView setSRSportShareContentForDayViewData:model];
}

- (void)showContentViewWithShareType:(SR_SPORT_SHARE_TYPE)type{
    
    if (type == SR_SHARE_TYPE_DAY_SLEEPING)
    {
        
        [self.srSportShareBottomBackgroundView setSRSportShareBottomBackgroundViewWithShareType:type];
        
        _srSportShareHeaderView.hidden = NO;
        
        _srSportShareHeaderView.shareType = type;
        
        _srSleepingShareContentView.hidden = NO;
        
        _srSportShareContentForMonthView.hidden = YES;
        
        _srSportShareContentForDayView.hidden = YES;
    }
    
    if (type == SR_SHARE_TYPE_DAY_SPORT)
    {
        _srSportShareHeaderView.hidden = NO;
        
        _srSportShareHeaderView.shareType = type;
        
        _srSportShareContentForDayView.hidden = NO;
                
        _srSleepingShareContentView.hidden = YES;
        
        _srSportShareContentForMonthView.hidden = YES;
        
    }
    
    if (type == SR_SHARE_TYPE_MONTH_SLEEPING)
    {
        _srSportShareHeaderView.hidden = NO;
        _srSportShareHeaderView.shareType = type;
        
        _srSportShareContentForDayView.hidden = YES;
        _srSleepingShareContentView.hidden = YES;
        _srSportShareContentForMonthView.hidden = NO;
        
    }
    
    if (type == SR_SHARE_TYPE_MONTH_SPORT)
    {
        _srSportShareHeaderView.hidden = NO;
        
        _srSportShareHeaderView.shareType = type;
        
        _srSportShareContentForMonthView.hidden = NO;
        
        _srSportShareContentForDayView.hidden = YES;
        
        _srSleepingShareContentView.hidden = YES;
        
    }
}

@end
